<div class="yuSuo clearfix" style="float:left;">
        <form id="searchFrom">
            <input id="status" name="status" type="hidden" value="{$params.status}"/>
            <?php if($params['status']== 1 || $params['status'] == 3): ?> 
            <input type="text" name="search_key" value="{$params.search_key}"  placeholder="奖券ID、奖金面值"  class="suoDian suoDian1" style="width:350px">
             <?php elseif($params['status']==2): ?>
              <input type="text" id="start_time" name="start_time" value="{$params.start_time}" placeholder="请选择使用时间" readonly /><em></em>
              <input type="text" id="end_time" name="end_time" value="{$params.end_time}" placeholder="请选择使用时间" readonly  style="margin-right:8px;"/>
              <div class="zhuang-tai">
                <input type="text" name="s_status" data="" value="{$state}" placeholder="请选择抽奖状态" readonly />
  
                <dl id="s_status">
                    <dd value="">请选择抽奖状态</dd>
                    <dd value="1">已抽奖</dd>
                    <dd value="0">未抽奖</dd>
                </dl>
            </div>
            <div class="zhuang-tai" 
            <?php if ($use_state != '' && $state == '已抽奖'): ?>
              style="display:block"
            <?php else: ?>
              style="display:none"
            <?php endif ?> >
                <input type="text" name="s_use_status" data="" value="{$use_state}"  placeholder="请选择发放状态" readonly />
                <dl id="s_use_status">
                    <dd value="">请选择使用状态</dd>
                    <dd value="1">已使用</dd>
                    <dd value="0">未使用</dd>
                </dl>
            </div>
            <input type="text" name="search_key" value="{$params.search_key}"  placeholder=" 奖券ID、车商姓名、拍单号"  class="suoDian suoDian1" style="width:250px">
            <?php endif;?>
            <input type="button" onclick="search();" value="搜索" class="suoSou" style="width:80px;">
        </form>
</div>
<div class="xinzeng clearfix">
  
</div>
<div class="yuList">
  <table class="table table-bordered">
    <thead>
      <tr>
        
          <th>奖券ID</th>     
          <?php if($params['status']==2): ?>
          <th>拍单号</th>
          <th>车型</th> 
          <th>车商姓名</th>
          <th>抽奖状态</th>
          <th>使用状态</th>
          <th>奖券创建时间</th>   
          <th>奖券使用时间</th>   
          <?php endif;?>
          <?php if($params['status']==1 || $params['status']==3): ?>
          <th>奖券创建时间</th>   
          <th>活动开始时间</th>   
          <th>活动截止时间</th>
          <?php endif;?>
          <th>奖券面值</th>      
      </tr>
    </thead>
    <tbody>
      <volist name="list" id="list" key="k">
        <tr>
          <td>{$list.card_no}</td>  
          <?php if($params['status']==2): ?>
          <td>{$list.order_no}</td> 
          <td>{$list.model}</td>
          <td>{$list.contact_person}</td>
          <td style="text-align: center;">{$list.guaka_state}</td>
          <td style="text-align: center;">{$list.shiyong_state}</td>
          <td>{$list.createtime}</td>
          <td style="text-align: center;">
            <?php if ($list['state'] == 1 && $list['use_state'] == 1): ?>
              {$list.verify_time}
            <?php else : ?>
              --
            <?php endif ?>
          </td>
          <?php endif;?>
          <?php if($params['status']==1 || $params['status']==3): ?>
          <td>{$list.createtime}</td>
          <td>{$list.starttime}</td>
          <td>{$list.endtime}</td>
          <?php endif;?>
          <td class="face_btn"><?php echo floor($list['price']); ?>元
          <?php if ($list['coupon']): ?>
              <div class="face_text">
              <?php foreach ($list['coupon'] as $key => $value): ?>
                  <em>代金券号：{$value.coupon_no}</em>
                  <em class="face_money">代金券面额：{$value.amount}</em>
              <?php endforeach ?>
              </div>
          <?php endif ?>
          </td>
        </tr>
      </volist>
    </tbody>
  </table>
 </div>
 <div class="pageFaye"><div class="pager">{$page}</div><div class="clear"></div></div>
</div>
<script>
$("#start_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});

$("#end_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});
  //赋值
  $('#s_status > dd').on('click',function(){
      $('input[name=s_state]').attr('data',$(this).attr('value'));
  });
  $('#s_use_status > dd').on('click',function(){
      $('input[name=s_use_state]').attr('data',$(this).attr('value'));
  });
  $("#s_status dd").click(function(){
      if($(this).text()!="已抽奖"){
          $(".zhuang-tai").eq(1).hide();
      }else{
          $(".zhuang-tai").eq(1).show();
      }
  });
$(".zhuang-tai input").click(function(event){
    $(this).siblings("dl").fadeToggle();
    $(this).parent().siblings().find("dl").fadeOut();
    $(".ping-pai dl").fadeOut();
    $(".che-xi dl").fadeOut();
    event.stopPropagation();
});  
$(".zhuang-tai dl dd").click(function(){    
    $(this).parent().siblings("input").val($(this).html());
    $(".zhuang-tai dl").fadeOut();
});

$(document).ready(function(){
    $(".face_btn").hover(function(){
      $(this).find(".face_text").fadeIn();
    },function(){
      $(this).find(".face_text").fadeOut();
    })
  })

</script>